
package com.jf.cloud.user.mapper;

import com.jf.cloud.api.user.vo.UserManagerVO;
import com.jf.cloud.user.dto.ShopCustomerDTO;
import com.jf.cloud.user.model.ShopCustomer;
import com.jf.cloud.user.vo.ShopCustomerVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 
 *
 * @author zz
 * @date 2023-01-15 15:53:16
 */
public interface ShopCustomerMapper {

    /**
     * 获取列表
     * @return 列表
     */
    List<ShopCustomer> list();

    /**
     * 根据id获取
     *
     * @param shopCustomerId id
     * @return 
     */
    ShopCustomer getByShopCustomerId(@Param("shopCustomerId") Long shopCustomerId);

    /**
     * 保存
     * @param shopCustomer 
     */
    void save(@Param("shopCustomer") ShopCustomer shopCustomer);

    /**
     * 更新
     * @param shopCustomer 
     */
    void update(@Param("shopCustomer") ShopCustomer shopCustomer);

    /**
     * 根据id删除
     * @param shopCustomerId
     */
    void deleteById(@Param("shopCustomerId") Long shopCustomerId);

    /**
     * 搜索条件获取列表
     * @param shopCustomerDTO
     */
    List<UserManagerVO> listByParam(@Param("shopCustomerDTO") ShopCustomerDTO shopCustomerDTO);

    /**
     * 批量添加客户
     * @param shopCustomers
     */
    void saveBatch(@Param("shopCustomers") List<ShopCustomer> shopCustomers);

    /**
     * 根据userId查询
     * @param userId
     * @return
     */
    List<ShopCustomer> listByUserId(@Param("userId") Long userId);


    /**
     * 根据店铺id获取店铺客户的userId
     * @param shopId
     * @return
     */
    List<Long> getShopCustomerIdsByShopId(@Param("shopId") Long shopId);
}
